Back.gif up.gif

Part 2: Unit 9


You have been tasked with "reusing" what's already there. You've already pulled out one or more components to support that functionality -- catalog maintenance -- how does your component measure up?

We just discussed several component coupling principles:
  • Acyclic Dependencies Principle
  • Stable Dependencies Principle
  • Stable Abstractions Principle

We also just learned about several metrics we can use to evaluate our components:
Instability


    • Where:
      ||
      || Efferent Coupling --> Fan Out (E in Efferent --> Exiting) ||

      ||
      || Afferent Coupling --> Fan In (A in Afferent --> Arriving) ||

Abstractness


    • Where:
      ||
      || Number of abstract classes in component ||

      ||
      || Number of classes in component ||


Distance from Main Sequence


    • Where:
      ||
      || Abstractness ||

      ||
      || Instability ||


What are the values for the original diagram?
Middle Tier






UI Tier







What to do next?
  • Now perform these calculations for your new component configuration. How do you compare?
  • What can you say about the components that have a "large" distance from the main sequence?
  • Knowing what you now know, work through a second round of componentization.


Final Observations
  • What is your experience with doing this kind of work?
  • What tool support have you used or do you see available to assist in this work?
  • Why go to all this trouble?

PPP_Exercise8And9.jpg


Back.gif up.gif